<?php
// index.php
// 2005-2008 Derek "Kazan" Meek
// used by permission

require_once("error_info.php");
$old_error_handler = set_error_handler("my_error_handler");

require_once("../config/config.php");
require_once("template.php");
require_once("page_base.php");
require_once("db.php");
require_once("menu.php");
require_once("app.php");
require_once("util.php");
require_once("session.php");
require_once("error_info.php");

//setup include paths
//is allows the auto loader to work for page classes, and to not need to worry about paths
//when require_once'ing things in /libs
$curpath = get_include_path();
set_include_path($curpath . PATH_SEPARATOR . "../lib" 
						. PATH_SEPARATOR . "./page_classes" 
						. PATH_SEPARATOR . "./data_classes");

//function __autoload($class_name) {
//    require_once $class_name . '.php';
//}
//php_ice doesn't get along with autoload
require_once("login.php");
require_once("user_ajax.php");
require_once("users.php");
require_once("vieworder.php");
require_once("viewcust.php");
require_once("addcust.php");
require_once("addorder.php");

$mapp = new application();
$mapp->run();

restore_error_handler();
?>